package com.hq.myvideo;


import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class P2fa  extends FragmentStateAdapter {
    private List<String> videoUrls;
    public P2fa(@NonNull @NotNull FragmentActivity fragmentActivity,List<String> path) {
        super(fragmentActivity);
        this.videoUrls=path;
    }

    @NonNull
    @NotNull
    @Override
    public Fragment createFragment(int position) {
        return  PlayFullFragment.newInstance(videoUrls.get(position));
    }


    @Override
    public int getItemCount() {
        return this.videoUrls.size();
    }

}
